package com.fire.chat.service.impl;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fire.chat.dao.SysLogMapper;
import com.fire.chat.entity.po.SysLog;
import com.fire.chat.service.SysLogService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;


/**
 * <p>标题: 系统日志 Service 实现类</p>
 * <p>描述: </p>
 * <p>版权: Copyright (c) 2020</p>
 *
 * @version: 1.0
 * @author: xiejiarong
 * @date 2020-11-10
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {

    @Override
    public List<SysLog> listAll() {
        return super.list(Wrappers.<SysLog>lambdaQuery().eq(SysLog::getIsDelete,0)).stream().peek(SysLog::makeLog)
                .collect(Collectors.toList());
    }
}
